package wei.xinya.springMybatis.service.impl;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import wei.xinya.springMybatis.dao.StudentDao;
import wei.xinya.springMybatis.entity.Student;
import wei.xinya.springMybatis.service.StudentService;

import javax.annotation.Resource;
import java.util.List;

@Service(value = "studentService")
public class StudentServiceImpl implements StudentService {
    @Value(value = "${test}")
    public String test;
    @Resource
    private StudentDao studentDao;

    @Override
    public void addStudent(Student student) {
        studentDao.addStudent(student);
    }

    @Override
    public List<Student> queryStudent() {
        return studentDao.queryStudent();
    }
}
